package by.dkusch.aircompany.model.filter.base;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

import javax.persistence.metamodel.SingularAttribute;

import by.dkusch.aircompany.model.tables.base.BaseEntity;

public abstract class FilterEntity<ID, Entity extends BaseEntity<ID>> implements Serializable {

	private static final long serialVersionUID = 1L;

	private ID id;
	private boolean arcFl;

	public ID getId() {
		return id;
	}

	public void setId(ID id) {
		this.id = id;
	}

	public boolean isArcFl() {
		return arcFl;
	}

	public void setArcFl(boolean arcFl) {
		this.arcFl = arcFl;
	}

	protected Map<SingularAttribute<? super Entity, ?>, Object> map;

	public Map<SingularAttribute<? super Entity, ?>, Object> getMap() {
		if (map == null) {
			map = new HashMap<SingularAttribute<? super Entity, ?>, Object>();
		}
		return map;
	}

	public void setMap(Map<SingularAttribute<? super Entity, ?>, Object> map) {
		this.map = map;
	}

}
